/**

This file is part of MaCI/GIMnet.

MaCI/GIMnet is free software: you can redistribute it and/or modify it 
under the terms of the GNU Lesser General Public License as published 
by the Free Software Foundation, either version 3 of the License, or 
(at your option) any later version.

MaCI/GIMnet is distributed in the hope that it will be useful, but WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public 
License for more details.

You should have received a copy of the GNU Lesser General Public 
License along with GIMnet. (See COPYING.LESSER) If not, see 
<http://www.gnu.org/licenses/>.

**/
#include "KeyWatcher.hpp"
#include "ownutils.h"

int main(int argc,  char **argv){
  // Init Debug lib
  debugInit();
  debugSetGlobalDebugLvl(4);
  const std::string logfile = std::string(argv[0]) + ".log";
  debugSetLogFilename(logfile.c_str());





  dPrint(1,"keywatcher executed\n");

  dPrint(1,"got params %s %s", argv[1],argv[2]);
  CKeyWatcher watcher("/dev/input/event0", atoi(argv[2]),atoi(argv[1]));

  while(watcher.IsRunning()){
    ownSleep_ms(200);
  }
  
  return 0;
}
